<include file='Common:header' />
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
	<!-- #section:basics/sidebar -->
	<include file='Common:left' />
	<!-- /section:basics/sidebar -->
	<div class="main-content">
		<div class="main-content-inner">
			<div class="page-content">
				<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/sldate/daterangepicker-bs3.css" />
				<div class="row maintop">
					<div class="col-xs-12 col-sm-3 top10">
						<a href="{:U('plug_file_filter')}">
						<button class="btn btn-sm btn-danger">
							<i class="ace-icon fa fa-bolt bigger-110"></i>
							检测未使用文件
						</button>
						</a>

					</div>
					<form name="admin_list_sea" class="form-search" method="post" action="{:U('plug_file_list')}">
						<div class="col-xs-12 col-sm-3 hidden-xs btn-sespan  top10">
							<div class="input-group">
										<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
										</span>
								<input type="text"  name="reservation" id="reservation" class="form-control sl-date" value="{$sldate}" placeholder="点击选择日期范围"/>
							</div>
						</div>
						<div class="col-xs-12 col-sm-4  top10">
							<div class="input-group">
								<span class="input-group-addon">
									<i class="ace-icon fa fa-check"></i>
								</span>
								<input type="text" name="val" id="val" class="form-control search-query" value="{$val}" placeholder="输入文件路径" />
								<span class="input-group-btn">
									<button type="submit" class="btn btn-purple btn-sm">
										<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
										搜索
									</button>
								</span>
							</div>
						</div>
						<div class="col-xs-12 col-sm-2 input-group-btn  top10">
							<a href="{:U('plug_file_list')}">
								<button type="button" class="btn btn-sm  btn-purple">
									<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
									显示全部
								</button>
							</a>
						</div>
					</form>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div>
							<table class="table table-striped table-bordered table-hover" id="dynamic-table">
								<thead>
								<tr>
									<th>ID</th>
									<th>文件路径</th>
									<th>文件大小</th>
									<th>上传时间</th>
									<th>查看</th>
								</tr>
								</thead>

								<tbody>
								<foreach name="plug_files" item="v">
									<tr>
										<td height="28" >{$v.id}</td>
										<td>{$v.path}</td>
										<td>{$v.filesize}</td>
										<td>{$v.uptime|date="Y-m-d H:i:s",###}</td>
										<td>
										<php>
											$is_img=exif_imagetype('.'.$v['path']);
											if(!$is_img){
												$suff=pathinfo($v['path'], PATHINFO_EXTENSION);
											}
										</php>
										<if condition="$is_img gt 0">
										<img src="__ROOT__{$v.path}" style="max-width:40px;max-height:40px;"/>
										<else />
										{$suff}文件
										</if>
										</td>
									</tr>
								</foreach>
									<tr>
										<td colspan="8" align="right" class="hidden-xs">{$page}</td>
										<td colspan="8" align="right" class="hidden-lg hidden-md hidden-sm">{$page_min}</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>

				<include file='Common:header_nav' />

			</div><!-- /.page-content -->
		</div>
	</div><!-- /.main-content -->
	<script>
	</script>
	<include file='Common:footer' />

</div><!-- /.main-container -->
<script type="text/javascript" src="__PUBLIC__/sldate/moment.js"></script>
<script type="text/javascript" src="__PUBLIC__/sldate/daterangepicker.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('#reservation').daterangepicker(null, function(start, end, label) {
			console.log(start.toISOString(), end.toISOString(), label);
		});
	});
</script>
</body>
</html>
